package com.teach;

/**
 * <pre>
 * -
 * Author : J.L.Zhou
 * E-Mail : 2233875735@qq.com
 * Tel : 151 1104 7708
 * Date : 2021-04-13 10:00
 * Version : 1.0
 * Copyright 2021 jlzhou.top Inc. All rights reserved.
 * Warning: this content is only for internal circulation of the company.
 *          It is forbidden to divulge it or use it for other commercial purposes.
 * </pre>
 **/
public class Demo02 {

  public static void main(String[] args) {
    System.out.println(String.format(":%s:%d:%f:\\%","字符串",999,88.8));
    System.out.println(String.format(":%s%1$s:%3$d:%2$f:","字符串",88.8,999));
    System.out.println(String.format(":%s%1$8s:%3$d:%2$f:","字符串",88.8,999));
    System.out.println(String.format(":%2s%1$-8s:%3$d:%2$f:","字符串",88.8,999));
    System.out.println(String.format(":%2s%1$-8s:%3$6d:%2$f:","字符串",88.8,999));
    System.out.println(String.format(":%2s%1$-8s:%3$-6d:%2$10.2f:","字符串",88.8,999));
    System.out.println(String.format(":%2s%1$-8s:%3$-6d:%2$-10.2f:","字符串",88.8,999));
  }
}
